<template>
  <div class="weui-cell">
    <div class="weui-cell__bd">{{device.lable}}-{{device.value}}</div>
    <div class="weui-cell__ft"><button class="weui-btn mini-btn" type="primary" size="mini" @click="action">{{device.lable}}</button></div>
  </div>
</template>

<script>
import { publishMessage } from "@/utils";
export default {
  name: "iotbutton",
  data() {
    return {};
  },
  props: {
    device: Object
  },
  mounted() {
    console.log(this.device);
  },
  methods: {
    action() {
      publishMessage(`{${dev.key}}`);
    }
  }
};
</script>

<style>
</style>
